import request from '@/router/axios';

export const getList = (current,size,params) => {
  return request({
    url: '/api/vingsoft-ywsp/deptInterInfo/deptInterInfoPage',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const addInter = (row) => {
  return request({
    url: '/api/vingsoft-ywsp/deptInterInfo/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/vingsoft-ywsp/deptInterInfo/update',
    method: 'post',
    data: row
  })
}

export const updateDataStatus = (datastatus,id) => {
  return request({
    url: '/api/vingsoft-ywsp/deptInterInfo/updateDataStatus',
    method: 'post',
    params: {
      datastatus,
      id
    }
  })
}

export const updateisDeleted = (isDeleted,id) => {
  return request({
    url: '/api/vingsoft-ywsp/deptInterInfo/updateisDeleted',
    method: 'post',
    params: {
      isDeleted,
      id
    }
  })
}

const isNumS = (rule, value, callback) =>{
  const num= /^[0-9]*$/
  if (!num.test(value)){
    callback(new Error( '只能为数字'))
  }else{
    callback()
  }
}



